package com.weitu.permission.duty.service.impl;

import com.weitu.permission.duty.entity.Duty;
import com.weitu.permission.duty.mapper.DutyMapper;
import com.weitu.permission.duty.service.DutyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;

@Service
public class DutyServiceImpl implements DutyService {

    private final DutyMapper dutyMapper;

    @Autowired
    public DutyServiceImpl(DutyMapper dutyMapper) {
        this.dutyMapper = dutyMapper;
    }

    @Override
    public Duty selectById(String id) {
        return dutyMapper.selectById(id);
    }

    @Override
    public int deleteById(String id) {
        return dutyMapper.deleteById(id);
    }

    @Override
    public int insert(Duty duty) {
        return dutyMapper.insert(duty);
    }

    @Override
    public int insertSelective(Duty duty) {
        return dutyMapper.insertSelective(duty);
    }

    @Override
    public int updateByIdSelective(Duty duty) {
        return dutyMapper.updateByIdSelective(duty);
    }

    @Override
    public List<Duty> queryList(Map map) {
        return dutyMapper.queryList(map);
    }

    @Override
    public int queryCount(Map map) {
        return dutyMapper.queryCount(map);
    }

}
